package org.xmap.ui.views;
import org.xmap.ui.View;
import org.xmap.ui.base.Window;
import org.xmap.ui.control.List;
import org.xmap.ui.listener.ItemListener;

public class ListView extends View {
    protected List l;
    public ListView() {
        this(null);
    }
    public ListView(View back) {
        super(back);
        this.l = new List(0, 0, 0, 0, Window.ORIENT_LEFT_UP);
        this.l.setScretchMode(Window.SCRETCH_ROW | Window.SCRETCH_COLUMN);
        this.l.setShowTitle(true);
        this.l.setFocus(true);
        this.addControls(this.l);
    }
    public void setColumnName(String first, String second, String third) {
        this.l.setColumnName(first, second, third);
    }
    public void setShowListTitle(boolean show) {
        this.l.setShowTitle(show);
    }
    public void setShowNumber(boolean show) {
        this.l.setShowNumber(show);
    }
    public void setListRowHeight(int rowHeight) {
        this.l.setRowHeight(rowHeight);
    }
    public void setItemListener(ItemListener il) {
        this.l.setItemListener(il);
    }
    public void addContent(int id, Object obj, String left, String middle, String right) {
        this.l.addContent(id, obj, left, null, middle, null, right, null, true);
    }
    public void removeAllContent() {
        this.l.removeAllContent();
    }
    public int getSelectId() {
        return this.l.getSelectId();
    }
    public Object getSelectObj() {
        return this.l.getSelectObj();
    }
}
